package o;

import com.huawei.appgallery.foundation.account.bean.AccountReqBodyBean;
import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.jsonkit.api.JsonBean;
import com.huawei.appgallery.jsonkit.api.annotation.FieldSecurity;
import com.huawei.appgallery.jsonkit.api.annotation.SecurityLevel;

public abstract class cvs extends cvt {
    public static final String TAG = "BaseSecretRequest";
    @FieldSecurity(security = SecurityLevel.PRIVACY)
    private String authorization_;
    @FieldSecurity(security = SecurityLevel.PRIVACY)
    private JsonBean bodyBean;

    protected void onSetValue() {
        super.onSetValue();
        AccountReqBodyBean accountReqBodyBean = new AccountReqBodyBean();
        UserSession instance = UserSession.getInstance();
        if (instance.isLoginSuccessful()) {
            accountReqBodyBean.ˊ(instance.getServiceToken());
            accountReqBodyBean.ˋ(instance.getAuthAccount());
            accountReqBodyBean.ॱ(instance.getDeviceType());
            accountReqBodyBean.ˎ(instance.getDeviceId());
            try {
                this.authorization_ = accountReqBodyBean.toJson();
            } catch (Exception e) {
                Logger.ˋ(TAG, "BaseSecretRequest IllegalAccessException");
            }
        }
    }

    public void ॱ(JsonBean jsonBean) {
        this.bodyBean = jsonBean;
    }
}
